<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="{{ asset('bundles/css/style.css') }}" />
        <link rel="stylesheet" href="{{ asset('bundles/font/style.css') }}" />
        <link rel="stylesheet" href="{{ asset('bundles/css/bootstrap.min.css') }}" />
        <link rel="stylesheet" href="{{ asset('bundles/js/tooltip/tooltipster.css') }}" />
        <link rel="stylesheet" href="{{ asset('bundles/js/tooltip/themes/tooltipster-perso.css') }}" />
        <link href='{{ asset('bundles/css/font-open-sans.css') }}' rel='stylesheet'>
        <title>{% block title %}{% endblock %}</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="{{ asset('bundles/js/jquery.js') }}"></script>
        <script src="{{ asset('bundles/js/tooltip/jquery.tooltipster.min.js') }}"></script>
    </head>
    <body align="center">
        {% for type, messages in app.session.flashBag.all %}
            {% for message in messages %}
                <div id="flashbag" class="{{ type }}">
                    {{ message|trans({}, 'FOSUserBundle') }}
                </div>
                <script>
                    jQuery(document).ready(function($) {
                        $('#flashbag').slideDown(500,function(){
                            elem=$(this);
                            setTimeout(function(){
                                elem.slideUp(500);
                            },2000)  
                        });
                    });
                </script>
            {% endfor %}
        {% endfor %}

    {% block menu %}
        <menu>
            <div><a href="{{path('readAllPromotion')}}"><i class="icon-books blue"></i>Gérer les promotions</a></div>
            <div><a href="{{path('readAllQuizz')}}"><i class="icon-bubbles blue"></i>Gérer les Quizz</a></div>
            <div><a href="{{path('readUser')}}"><i class="icon-users blue"></i>Gérer les utilisateurs</a></div>
            <span id="connexion-menu">
                <b>Connecté en tant que {{ app.user.username }}</b>
                <a href="{{path('fos_user_security_logout')}}"><i class="icon-enter blue"></i>Déconnexion</a>
            </span>
        </menu>
    {% endblock %}
        {% block other %}
        {% endblock %}
        <div id="body" {% block bodyplus %}{% endblock %} class="{% block class_body %}rien{% endblock %}" >
                {% block body %}
                {% endblock %}
        </div>
        {% block other2 %}
        {% endblock %}
        <script>
            $(document).ready(function() {
                $('.tooltips').tooltipster({
                    animation: 'fade',
                    theme: 'tooltipster-perso',
                    contentAsHTML:true,
                    delay:0
                }); 
            }); 
        </script>
    </body>
</html>